package com.kele.dao;



import com.kele.domain.ThumbsUp;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ThumbsUpDao {

    /**
     * 添加一条点赞记录
     * @param thumbsup
     * @return
     */
    Integer insertthumbsUp(ThumbsUp thumbsup);

    /**
     * 根据id删除一条点赞记录
     * @param thumbsupid
     * @return
     */
    Integer deleteThumbsUp(int thumbsupid);

    /**
     *查询点赞记录
     * @param thumbsup
     * @return
     */
    List<ThumbsUp> findThumbsUpList(ThumbsUp thumbsup);

    /**
     * 根据博客id和用户id查询点赞记录
     * @param blogid
     * @param userid
     * @return
     */
    ThumbsUp findThumbsUp(@Param(value = "blogid") int blogid,
                          @Param(value = "userid") int userid);

}
